package com.schoolCommunity.community.entity.common;

import lombok.Data;
import org.apache.ibatis.annotations.Param;

@Data
public class Result {

    private int code;
    private String message;
    private Object data;

    public static Result success(String message,int code,Object data){
        Result result = new Result();
        result.setCode(code);
        result.setData(data);
        result.setMessage(message);

        return result;
    }

    public static Result error(String message,int code,Object data){
        Result result = new Result();
        result.setCode(code);
        result.setData(data);
        result.setMessage(message);

        return result;
    }
}
